﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Zombie_Demo.Utilities
{
    public static class Log
    {
        private static List<string> log = new List<string>();

        public static void AddLogEvent(string msg)
        {
            log.Add(msg);
        }

        public static void WriteLog()
        {
            TextWriter w = new StreamWriter(@"log.txt");
            foreach (string e in log)
            {
                w.Write(e);
                w.Write(w.NewLine);
            }
            w.Write("Log length: " + log.Count.ToString());
            w.Close();
        }
    }
}
